import { request } from '@/utils/request'

export const playListApi = (page: number, limit: number) => {
  return request ({
    method: 'POST',
    url: '/order/Playlist',
    data: {
      page,
	  limit
    },
  })
}
export const playDescApi = (id: number) => {
  return request ({
    method: 'GET',
    url: '/order/detail',
    data: {
     id,
    },
  })
}

export const toRobberApi = (id: number) => {
  return request ({
    method: 'POST',
    url: '/order/toRobberyOrder',
    data: {
     id,
    },
  })
}

export const surePlayOrderApi = (id: number) => {
  return request ({
    method: 'POST',
    url: '/order/surePlayOrder',
    data: {
     id,
    },
  })
}

export const userPlaylistApi = (page: number,limit: number,status: number) => {
  return request ({
    method: 'GET',
    url: '/order/userPlaylist',
    data: {
     page,
	 limit,
	 status
    }
  })
}

export const userPlayAddApi = (name: string,id_no: number,mobile: number,sex:number,desc:string) => {
  return request ({
    method: 'POST',
    url: '/play/add',
    data: {
     name,
	 id_no,
	 mobile,
	 sex,
	 desc
    }
  })
}

export const getPageListApi = (limit:number,page:number,keyword:string) => {
  const limits = limit ==0 ? '':limit;
  const pages = page ==0 ? '':page;
  return request ({
    method: 'POST',
    url: '/play/getPageList',
    data: {
       limit:limits,
	   page:pages,
	   keyword
    },
  })
}


export const playDetailApi = () => {
  return request ({
    method: 'POST',
    url: '/play/detail',
    data: {
     
    },
  })
}

export const fenxiangApi = () => {
  return request ({
    method: 'POST',
    url: '/user/qrCode',
    data: {},
  })
}